﻿<%@ Page Title="" Language="C#" MasterPageFile="~/module/Fontend.Master" AutoEventWireup="true"
    CodeBehind="Health.aspx.cs" Inherits="mamnontuoitho7.module.Health" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div class="green">
       <a href="Home.aspx">Trang chủ</a> &raquo; Sức khỏe<%= (_currentSubArticleID != "2") ? "&raquo;" + Session["Common_articleTypeName"] : ""%></div>
    <%
        if(_dt.Rows.Count > 0)
        {    
            for (int i = 0; i < _dt.Rows.Count; i++)
            {
    %>
    <div class="articles">
        <a href="HealthDetails.aspx?ArticleID=<%=_dt.Rows[i]["ProductID"].ToString()%>">
        <% if ( _dt.Rows[i]["Photo"].ToString()!="" )
           { %>
            <img src="../images/article/<%=_dt.Rows[i]["Photo"].ToString() %>" alt="<%=_dt.Rows[i]["Title"].ToString() %>" />
            <%} %>
            <h1 class="h1_green">
                <%= _general.CutString(_general.ReplaceSpecialCharacters(_dt.Rows[i]["Title"].ToString()), 60)%></h1>
            <h2>
                <span class="postnews">Cập nhật ngày:<%= DateTime.Parse(_dt.Rows[i]["PostDate"].ToString()).ToString("dd/MM/yyyy HH:mm:ss")%></span>
                <span class="view">Lượt xem:<%=_dt.Rows[i]["ViewNumber"].ToString() %></span> 
                <span class="comment">Bình luận:<%= _comment.TotalCommentOfOneProduct(_dt.Rows[i]["ProductID"].ToString()).GetValueOrDefault() %></span></h2>
            <span></span>
            <p>
                <%= _general.CutString(_general.ReplaceSpecialCharacters(_dt.Rows[i]["Introduce"].ToString()), 260)%></p>
        </a>
    </div>
    <%      }
        }
        else
        { %>
        <div class="commingsoon">
            Dữ liệu đang được cập nhật....
        </div>
        <%} %>

    <div id="container">
        <div class="pagination">
            <%if (_currentbar > 1)
              { %>
            <a href="Health.aspx?a=-1<%= (_currentSubArticleID != "2") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pagegreen"><<</a>
            <%} %>
            <%  
                for (int j = _beginPage; j <= _endPage; j++)
                {
                    if (j == _pageflag)
                    {
            %>
            <a href="Health.aspx?page=<%= j%><%= (_currentSubArticleID != "2") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pagegreen active"><%= j%></a>
            <% }else
               { %>
            <a href="Health.aspx?page=<%= j%><%= (_currentSubArticleID != "2") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pagegreen"><%= j%></a>
            <%  }
                    } %>
            <%if (_currentbar < _totalBars)
              { %>
            <a href="Health.aspx?a=1<%= (_currentSubArticleID != "2") ? "&SubArticle="+_currentSubArticleID : ""%>" class="pagegreen">>></a>
            <%} %>
        </div>
    </div>
</asp:Content>
